/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 */

#ifndef _SOC_QCOM_LLCC_EVENTS_H_
#define _SOC_QCOM_LLCC_EVENTS_H_

enum event_port_select {
	EVENT_PORT_FEAC,
	EVENT_PORT_FERC,
	EVENT_PORT_FEWC,
	EVENT_PORT_BEAC,
	EVENT_PORT_BERC,
	EVENT_PORT_TRP,
	EVENT_PORT_DRP,
	EVENT_PORT_PMGR,
	EVENT_PORT_BEAC1,
	EVENT_PORT_TENURE,
	EVENT_PORT_TLAT,
};

enum feac_events {
	FEAC_ANY_ACCESS,
	FEAC_READ_INCR,
	FEAC_WRITE_INCR,
	FEAC_WRITE_ORDERED,
	FEAC_READE_EXCL,
	FEAC_WRITE_EXCL,
	FEAC_CMO,
	FEAC_CMO_CLEAN,
	FEAC_CMO_INVAL,
	FEAC_CMO_CLEANINVAL,
	FEAC_CMO_DCPLD,
	FEAC_READ_NOALLOC,
	FEAC_WRITE_NOALLOC,
	FEAC_PREFETCH,
	FEAC_RD_BYTES,
	FEAC_RD_BEATS,
	FEAC_WR_BYTES,
	FEAC_WR_BEATS,
	FEAC_FC_READ,
	FEAC_EWD_ACCESS,
	FEAC_TCM_ACCESS,
	FEAC_GM_HIT,
	FEAC_GM_MISS,
	FEAC_GM_UNAVAILABLE,
	FEAC_XPU_ERROR,
	FEAC_READ_HAZARD,
	FEAC_WRITE_HAZARD,
	FEAC_GRANULE_READ,
	FEAC_GRANULE_WRITE,
	FEAC_RIFB_ALLOC,
	FEAC_WIFB_ALLOC,
	FEAC_RIFB_DEALLOC,
	FEAC_WIFB_DEALLOC,
	FEAC_RESERVED,
	FEAC_RESERVED1,
	FEAC_FEAC2TRP_LP_TX,
	FEAC_TRP_LP_BUSY,
	FEAC_FEAC2TRP_HP_TX,
	FEAC_TRP_HP_BUSY,
	FEAC_FEAC2FEWC_TX,
	FEAC_BEAC_LP_BUSY,
	FEAC_BEAC_HP_BUSY,
	FEAC_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TX,
	BEAC_RD_GRANULE,
	BEAC_WR_GRANULE,
	BEAC_WR_BEAT_TX,
	BEAC_RD_CRDT_ZERO,
	BEAC_WR_CRDT_ZERO,
	BEAC_WDATA_CRDT_ZERO,
	BEAC_IFCMD_CRDT_ZERO,
	BEAC_IFWDATA_CRDT_ZERO,
	BEAC_PCT_ENTRY_ALLOC,
	BEAC_PCT_ENTRY_FREE,
	BEAC_PCT_FULL,
	BEAC_RD_PROMOTION_TX,
	BEAC_WR_PROMOTION_TX,
	BEAC_RD_PRESSURE_TX,
	BEAC_WR_PRESSURE_TX,
};

enum berc_events {
	BERC_RD_CMD,
	BERC_ERROR_CMD,
	BERC_PCT_ENTRY_DEALLOC,
	BERC_RD_RSP_RX,
	BERC_RD_RSP_BEAT_RX,
	BERC_RD_LA_RX,
	BERC_UNSTALL_RX,
	BERC_TX_RD_CMD,
	BERC_TX_ERR_CMD,
	BERC_TX_RD_BEAT,
	BERC_TX_ERR_BEAT,
	BERC_RESERVED,
	BERC_RESERVED1,
	BERC_CMO_RX,
	BERC_CMO_TX,
	BERC_DRP_WR_TX,
	BERC_DRP_WR_BEAT_TX,
	BERC_FEWC_WR_TX,
	BERC_FEWC_WR_BEAT_TX,
	BERC_LBUFFS_FULL,
	BERC_DRP_BUSY,
	BERC_FEWC_BUSY,
	BERC_LBUFF_STALLED,
};

enum trp_events {
	TRP_ANY_ACCESS,
	TRP_INCR_RD,
	TRP_INCR_WR,
	TRP_ANY_HIT,
	TRP_RD_HIT,
	TRP_WR_HIT,
	TRP_RD_MISS,
	TRP_WR_MISS,
	TRP_RD_HIT_MISS,
	TRP_WR_HIT_MISS,
	TRP_EVICT,
	TRP_GRANULE_EVICT,
	TRP_RD_EVICT,
	TRP_WR_EVICT,
	TRP_LINE_FILL,
	TRP_GRANULE_FILL,
	TRP_WSC_WRITE,
	TRP_WSC_EVICT,
	TRP_SUBCACHE_ACT,
	TRP_SUBCACHE_DEACT,
	TRP_RD_DEACTIVE_SUBCACHE,
	TR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